@using Hsp.WebNovels.Web.Models
@using Hsp.WebNovels.Common.Constants
@model ContentViewModel

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="row-fluid">

@await Component.InvokeAsync("PageHeader")


        <div id="toolbar">
            <div class="form-inline" role="form">
                <form class="form-inline form-toolbar">
                    <div class="form-group row">
                        <input name="search" class="form-control form-control-sm" type="text" placeholder="搜索">
                    </div>
                </form>
                <button id="remove" class="btn btn-sm btn-danger" disabled>
                    <i class="glyphicon glyphicon-remove"></i>批量删除
                </button>
                <button id="btnAdd" class="btn btn-sm btn-primary">
                    <i class="glyphicon glyphicon-plus"></i>添加章节内容
                </button>
                <div class="btn-group" role="group" aria-label="query group">
                    <button id="btnSearch" class="btn btn-sm btn-primary" style="margin-right: 0!important;">
                        <i class="glyphicon glyphicon-search" aria-hidden="true"></i>查询
                    </button>
                    <button id="btnClear" type="reset" class="btn btn-secondary btn-sm" title="清空查询条件">
                        <i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
                    </button>
                </div>
            </div>
        </div>

    <div class="table-responsive">
        <table id="content-table" class="table table-striped table-sm table-hover" data-toggle="table" data-toolbar="#toolbar"></table>
    </div>

</div>

<!-- 章节内容编辑模态窗体 //-->
<div class="modal fade" id="editModel" tabindex="-1" role="dialog" data-backdrop="static" data-keyboard="false" aria-labelledby="editModelLabel" aria-hidden="true">
    <div class="modal-dialog modal-dialog-scrollable modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="editModelLabel">章节内容编辑</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">

                <form class="form-horizontal">
                    <input type="hidden" asp-for="ChapterId" />
                    <input type="hidden" asp-for="NovelId" />
                    <div class="form-group row">
                        <label asp-for="Contents" class="col-2 col-form-label col-form-label-sm"></label>
                        <div class="col-10">
                            <textarea asp-for="Contents" class="form-control form-control-sm"></textarea>
                            <span asp-validation-for="Contents" class="text-danger"></span>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label asp-for="Contents" class="col-2 col-form-label col-form-label-sm"></label>
                        <div class="col-10">
                            <textarea asp-for="Contents" class="form-control form-control-sm"></textarea>
                            <span asp-validation-for="Contents" class="text-danger"></span>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label asp-for="CreateTime" class="col-2 col-form-label col-form-label-sm"></label>
                        <div class="col-10">
                            <input asp-for="CreateTime" class="form-control form-control-sm" />
                            <span asp-validation-for="CreateTime" class="text-danger"></span>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label asp-for="UpdateTime" class="col-2 col-form-label col-form-label-sm"></label>
                        <div class="col-10">
                            <input asp-for="UpdateTime" class="form-control form-control-sm" />
                            <span asp-validation-for="UpdateTime" class="text-danger"></span>
                        </div>
                    </div>

                </form>
            
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">
                    <i class="glyphicon glyphicon-floppy-remove" aria-hidden="true"></i>关闭
                </button>
                <button type="button" class="btn btn-sm btn-primary" id="btnSave">
                    <i class="glyphicon glyphicon-floppy-saved" aria-hidden="true"></i>保存
                </button>
            </div>
        </div>
    </div>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
        <environment names="Development">
            <link href="~/view-resources/Contents//TableList.css" rel="stylesheet" asp-append-version="true" />
            <script src="~/view-resources/Contents//TableList.js" asp-append-version="true"></script>
        </environment>
    
        <environment names="Staging,Production">
            <link href="~/view-resources/Contents//TableList.min.css" rel="stylesheet" asp-append-version="true" />
            <script src="~/view-resources/Contents//TableList.min.js" asp-append-version="true"></script>
        </environment>
    
        <style type="text/css">
    
        </style>
    
        <script type="text/javascript">
    
        </script>
    
        }
